package com.clarence.dada.config.web;


import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * spring mvc的配置
 *
 * @author GD
 * @since 2020/4/11 10:23
 */
@Configuration
public class SpringMvcConfiguration implements WebMvcConfigurer {
//
//    @Resource
//    private AuthJwtTokenSecurityInterceptor authJwtTokenSecurityInterceptor;
//
//    @Resource
//    private PermissionSecurityInterceptor permissionSecurityInterceptor;
//
//    /**
//     * 重写系统的默认错误提示
//     *
//     * @author GD
//     * @since 2020/12/16 15:36
//     */
//    @Bean
//    public CustomErrorAttributes gunsErrorAttributes() {
//        return new CustomErrorAttributes();
//    }
//
//    /**
//     * json自定义序列化工具,long转string
//     *
//     * @author GD
//     * @since 2020/12/13 17:16
//     */
//    @Bean
//    public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer() {
//        return jacksonObjectMapperBuilder -> {
//            jacksonObjectMapperBuilder.serializerByType(Long.class, ToStringSerializer.instance).serializerByType(Long.TYPE, ToStringSerializer.instance);
//            jacksonObjectMapperBuilder.annotationIntrospector(new CustomJacksonIntrospector());
//        };
//    }
//
//    /**
//     * 配置项目拦截器
//     *
//     * @author GD
//     * @since 2020/12/18 9:43
//     */
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(authJwtTokenSecurityInterceptor);
//        registry.addInterceptor(permissionSecurityInterceptor);
//    }
//

}
